import java.util.Scanner;
import java.util.Arrays;

public class Solution {
    public static void main(String[] args) {
        Scanner num = new Scanner(System.in);
        int n = num.nextInt();
        int[] nums = new int[n];
        for (int i = 0; i < n; i++) {
            nums[i] = num.nextInt();
        }
        boolean a = containsDuplicate(nums);
        System.out.println(a);
    }

    /**
     * 用后一个数减去前一个数进行判断，时间效率高
     * @param nums 传入数组
     * @return 返回布尔类型的值
     */
    public static boolean containsDuplicate(int[] nums) {

        //复杂且运行超时
/*        for (int i = 0; i < nums.length; i++) {
            int temp = nums[i];
            int flag = 0;
            for (int j = 0; j < nums.length; j++) {
                if (temp == nums[j]) {
                    flag++;
                }
            }
            if (flag >= 2) {
                return true;
            }
        }
        return false;*/

        Arrays.sort(nums);
        for (int i = 1; i < nums.length; i++) {
            if (nums[i] == nums[i - 1]) {
                return true;
            }
        }
        return false;
    }
}